//
//  ViewController.m
//  进度条
//
//  Created by Rookie_YX on 16/7/12.
//  Copyright © 2016年 YX_Rookie. All rights reserved.
//

#import "ViewController.h"
#import "DLProgressImageView.h"

@interface ViewController ()<XZDownLoadProgressDelegate>
@property(nonatomic, strong) DLProgressImageView * imgView;
@end

@implementation ViewController

- (void)viewDidLoad {
  [super viewDidLoad];
  // Do any additional setup after loading the view, typically from a nib.
  
  UIView * view = [[UIView alloc]initWithFrame:self.view.bounds];
  DLProgressImageView * img = [[DLProgressImageView alloc]initDLProgressImageView:view];
  img.frame = CGRectMake(100, 100, 60, 60);
  [img startDownLoad];
  img.backgroundColor = [UIColor orangeColor];
  UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap)];
  [img addGestureRecognizer:tap];
  self.imgView = img;
  [self.view addSubview:view];
  
}
- (void)tap{
  NSLog(@"%s",__func__);
  DLProgressImageView * view = [[DLProgressImageView alloc]initDLProgressImageView:self.imgView];
  view.delegate = self;
  [self.view addSubview:view];
}
#pragma  mark - XZDownLoadProgressDelegate
- (void)startDownLoadImage:(UIImageView *)imageView{
  
}
@end
